package com.gang.mars.basic.generictype.demo9.metadata;

import com.gang.mars.basic.generictype.demo9.annotation.GangAnnotation;
import com.gang.mars.basic.generictype.demo9.annotation.GangMergedAnnotation;
import com.gang.mars.basic.generictype.demo9.annotation.GangMergedAnnotations;
import com.gang.mars.basic.generictype.demo9.selectors.GangMergedAnnotationSelectors;

import java.util.Map;

/**
 * @Author：gang.chen
 * @Date：2023/6/19 8:56
 */
public interface GangAnnotationMetadata extends GangClassMetadata{


    public GangMergedAnnotations getAnnotations();

    public default Map<String, Object> getAnnotationAttributes(String annotationName, boolean classValuesAsString)
    {
        /**
         * 迭代对象实例
         * */
        GangMergedAnnotations mergedAnnotations = getAnnotations();


        /**
         * 泛型A对象，GangFirstDirectlyDeclared 创建时，明确为GangAnnotation
         * 泛型get方法，类泛型方法
         * */
        GangMergedAnnotation<GangAnnotation> typeMappedAnnotation = mergedAnnotations.get(annotationName, null, GangMergedAnnotationSelectors.firstDirectlyDeclared());

        return null;
    }
}
